import 'package:fate_blind_box/model/chat_friend_message_entity.dart';
import 'package:fate_blind_box/model/group_intro_entity.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:im_flutter_sdk/im_flutter_sdk.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';

class GroupChatState {
  FocusNode focusNode = FocusNode();

  // 群号也叫会话id
  var groupId = '';
  EMConversation? conversation;

  // 是否为管理员状态
  var owner = '';
  // title
  var title = ''.obs;

  /// 群头像
  var avatarUrl = ''.obs;
  // 群成员数量
  // 是否有更多
  var hasMore = false.obs;
  RefreshController refreshController =
      RefreshController(initialRefresh: false);
  // 滚动控制器
  ScrollController scrollController = ScrollController();
  // 数据源
  var messageList = <EMMessage>[].obs;
  // 好友信息
  var userInfoList = <EMUserInfo>[].obs;
  // 平台好友信息列表
  var locInfoList = [ChatFriendMessageEntity()].obs;
  // 群简介
  var model = GroupIntroEntity().obs;

  // 群状态监听tag
  var tag = 'GroupChatLogic';

  GroupChatState() {
    ///Initialize variables
  }
}
